<template>
  <!-- 头部 -->
  <div class="max">
    <div class="title">
      <div class="search">
        搜索
      </div>
      <span v-for="(item,index) in titleArr" :key="index" :class="{activetwo:niubi == index}" @click='qiehuantwo(index)'>
        {{item}}
      </span>
    </div>
  </div>

</template>

<script>
export default {
  props: ['niubi', 'titleArr'],
  methods: {
    qiehuantwo(index) {
      this.$emit('qiehuantwo', index)
    }
  },
}
</script>

<style lang='scss' scoped>
// 头部
.max {
  width: 100%;
  height: 100%;

  .title {
    width: 100%;
    height: 40px;
    // background-color: aqua;
    display: flex;
    justify-content: space-around;
    align-items: center;

    .search {
      width: 90px;
      height: 40px;
      border-radius: 15px;
      background-color: #f8f8f8;
      text-align: center;
      line-height: 40px;
      font-weight: 600;
    }

    span {
      font-weight: 600;
    }
  }
}
</style>